<template>
	<view class="content bg-white">
		在线客服
	</view>
</template>

<script>
	
	// #ifdef APP-PLUS
	let sweixin = null
	console.log('kefu 1')
	plus.share.getServices(res=>{
		console.log('kefu 2')
		sweixin = res.find(i => i.id === 'weixin')
		console.log('kefu 3')
		if(sweixin){
			console.log('kefu 4')
			sweixin.openCustomerServiceChat({
			// 注意这里，官网说这里要用微信小程序的原始id（g_开头的）, 我试了不行，这里我用的企业id就可以了，
			// 并且企业主体账号之类的要保持一致
				corpid: 'ww5f63ceded24818ab',    	//企业ID
				//corpid: '1618741102',				//微信商户ID(不行)
				//corpid: 'taiji9281',				//微信客服ID(不行)
				//corpid: 'kfcc5d6030bea412d37',
				//corpid: 'kfc2fae113292ed5e4f',	//微信客户账号ID(不行)
				//corpid: 'gh_00771aba6f7c',			//微信小程序ID(不行)
				url: 'https://work.weixin.qq.com/kfid/kfcc5d6030bea412d37',
			},suc=>{
				console.log('kefu 4-1')
				console.log("success",JSON.stringify(res))
			},err=>{
				console.log('kefu 4-2')
				console.log("error",JSON.stringify(err))
			})
		}else{
			plus.nativeUI.alert('当前环境不支持微信操作!')
		}
	},function(){
		uni.showToast({title: "获取服务失败，不支持该操作。"+JSON.stringify(e), icon: 'error'})
	})
	// #endif
	// #ifndef APP-PLUS
	window.location.href = "https://work.weixin.qq.com/kfid/kfcc5d6030bea412d37"
	// #endif
	
	export default {
		name: 'aboutUs',
		data() {
			return {
				
			};
		},
		methods:{
		},
	}
</script>

<style lang="scss" scoped>
.content {
	height: auto;
	overflow: hidden;
	.block1{
		width: 100%;
		height: 110px;
		background: url('https://ylb123.oss-cn-hangzhou.aliyuncs.com/app/about-us.jpg') 0 0 no-repeat;
		background-size: 100% auto;
		border: 0px solid #f00;
	}
	.mainCon{
		padding: 15px;
		.title{
			text-align: center;
			font-size: 20px;
			font-weight: 700;
			color: #117dd6;
			margin-top: 25px;
		}
		.doc-line{
			width: 20px;
			margin: 10px auto;
			border-top: 4px solid #117dd6;
			border-radius: 2px;
		}
		.p1{
			line-height: 30px;
			margin-bottom: 25px;
			text-align: justify;
			text-indent: 32px;
			font-size: 16px;
			color: #333;
			p{
				margin-bottom: 10px;
			}
		}
		.btn1{
			width: 80%;
			padding: 15px;
			margin: 15px auto;
			border-radius: 60px;
			text-align: center;
			border: 1px solid #40a9ff;
			background-color: #40a9ff;
			color: #fff;
			font-size: 16px;
		}
		.btn2{
			width: 80%;
			padding: 15px;
			margin: 15px auto;
			border-radius: 60px;
			text-align: center;
			border: 1px solid #d9d9d9;
			background-color: #fff;
			color: #666;
			font-size: 16px;
		}
	}
}
</style>
